home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
tclMotif-1.4
/
wtour
/
drawingarea1.tcl
< prev
next >
Wrap
Text File
|
1995-06-29
|
465b
|
22 lines
#
# DrawingArea
#
# for this, we have to do Xlib-style drawing ourselves, which
# should only be done in exposeCallback, and for which we need
# graphics contexts.
xmDrawingArea .da managed
.da exposeCallback show_text
set gc1 [.da getGC -foreground yellow -background green]
set gc2 [.da getGC -foreground blue -background pink]
proc show_text {} {
global gc1
global gc2
.da drawImageString $gc1 30 30 "hello"
.da drawImageString $gc2 30 80 "world"
}